import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import postCssPxToRem from 'postcss-pxtorem'

// https://vite.dev/config/
export default defineConfig({
  base: "./", // 设置本地相对路径
  plugins: [
    vue(),
    
  ],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  },
  css: {
     postcss:{
       plugins: [
          postCssPxToRem({
            rootValue: 37.5,
            propList: ['*'],
            exclude: /node_modules/i
          })
       ]
     }
  }
})
